<?php   namespace web\admin\controller;
/**
 * Created by PhpStorm.
 * Date: 2016/9/6
 * Time: 0:41
 */
class Index extends Common
{
    public function index()
    {
        //显示模板
        View::make();
    }
    //修改后台登录密码
    public function changePass(){
        //执行自动验证
        if(IS_POST){
            $usermodel=new \system\model\User();
            if($usermodel->changePass()){
                message('操作成功',u('index.index'),'success');
            }else{
                message($usermodel->getError(),'back','error');
            }
        }
        View::make();
    }

}